package com.huawei.java.pojo;

/**
 * 专门为服务器装的虚拟机数量的集合
 * @author 金昊霖
 */
public final class SimpleServer implements Comparable<SimpleServer>{
    /**
     * 服务器id
     */
    private final int serverId;
    /**
     * 当前服务器所有的数量
     */
    private final int num;



    public SimpleServer(int serverId, int num) {
        this.serverId = serverId;
        this.num = num;
    }

    @Override
    public int compareTo(SimpleServer o) {
        return Integer.compare(num,o.getNum());
    }
    public int getServerId() {
        return serverId;
    }

    public int getNum() {
        return num;
    }
}
